package d1204;


    import java.util.ArrayList;
import java.util.List;

    public class Student {
        private String name;
        private int score;
        private String id;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        @Override
        public String toString() {
            return "Student{" +
                    "name='" + name + '\'' +
                    ", score=" + score +
                    ", id='" + id + '\'' +
                    '}';
        }

        public Student(String name, String id, int score) {
            this.name = name;
            this.score = score;
            this.id = id;
        }

        public Student(String name, int score) {
            this.name = name;
            this.score = score;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public int getScore() {
            return score;
        }

        public void setScore(int score) {
            this.score = score;
        }


        public static List<Student> getBl60(List<Student> list,int x) {//可变长度的容器---集合arraylist
            int l=list.size();
            List<Student> listbl60=new ArrayList<>();
            for (Student stud:list){
                if (stud.getScore()<x){
                    listbl60.add(stud);

                }

            }return listbl60;}}

